const express = require('express');

const{
    httpAbortLaunch,
    httpAddNewLaunch,
    httpGetAllLaunches,
}=require('./launches.controller');
// 创建 launchesRouter 路由器实例
const launchesRouter = express.Router();

// 为 launchesRouter 路由器实例添加 GET 请求处理方法
launchesRouter.get('/', httpGetAllLaunches);
launchesRouter.post('/', httpAddNewLaunch);

module.exports = launchesRouter;

// 为 launchesRouter 路由器实例添加 DELETE 请求处理⽅法
launchesRouter.delete('/:id', httpAbortLaunch);